#include <stdio.h>
#include <Windows.h>
#include <assert.h>
#include <locale.h>
#include "SearchAppCore.h"
#include "TestStringX.h"
#include "tstl2cl\include\c_map.h"
#include "tstl2cl\c_pair.h"




int main()
{
	//SHELLEXECUTEINFO ShellInfo;
	//wchar_t wcs[] = L"lnk,htm";
	//wchar_t *token;
	////setlocale(LC_ALL, "chs");   
	//for (token = wcstok(wcs, L",");
	//	token != NULL;
	//	token = wcstok(NULL, L",")) 
	//{
	//	wprintf(L"%s",token);
	//}
   //memset(&ShellInfo, 0, sizeof(ShellInfo));
   //ShellInfo.cbSize = sizeof(ShellInfo);
   //ShellInfo.hwnd = NULL;
   //ShellInfo.lpVerb = TEXT("open");
   //ShellInfo.lpFile = L"cmd"; 
   //ShellInfo.nShow = SW_SHOWNORMAL;
   //ShellInfo.fMask = SEE_MASK_NOCLOSEPROCESS;

   //ShellExecuteEx(&ShellInfo);

	//TestStringLastIndexOf();
	//Search(L"s");

	wchar_t token[] = L"exe,htm";
	IndexProgram(L"c:\\Program Files\\",token);

	//c_map map;
	//c_iterator iterator;
	//c_iterator map_end;
	//c_pair pair_ary[] = 
	//{
	//	{ 0, 0 }
	//};

	////struct key * pkey = (struct key*)malloc(sizeof(struct key));
	////pkey->command = L"test";
	//pair_ary[0].first = L"key";
	//pair_ary[0].second = L"value";
	//c_map_create(&map,key_comparer);
	//c_map_insert(&map, &pair_ary[0]);

	//pair_ary[0].first = L"key";
	//pair_ary[0].second = L"test";

	//c_map_insert(&map, &pair_ary[0]);

	//iterator = c_map_find(&map,L"key1");
	//map_end = c_map_end(&map);
	//if(!ITER_EQUAL(map_end, iterator))
	//{
	//	wprintf(L"to erase : %s\n",(((c_ppair)ITER_REF(iterator))->second));
	//}
	//c_map_destroy(&map);


	return 1;
}
